This page last changed on Oct 23, 2008 by scytacki.

Setup JNLP Deployment Environment and Using the Maven Webstart Jnlp Plugin

Child pages sorted with the most recently updated first:

Solutions to common problems

Dependency Problems

  1. the jnlp plugin (and all maven plugins as far as I can tell) doesn't handle it well when you have build and installed or deployed a local snapshot project. If your jnlp depends on this project it will pickup the -SNAPSHOT version instead of the -2007... timestamp version. So the trick is to have the jnlp plugin use a different local repository when it is run. This can be done by making a new settings.xml file which has a localRepository element. This should point to somewhere other than the default (~/.m2/repository). This new settings.xml file is specified using the -s option to mvn. More about the way -SNAPSHOT versions are handled by maven: Repository-SNAPSHOT Handling

Jar Format Problems

Jar doesn't pack correctly.
  1. The ibm icu4j jar does not pack correctly, so after the first run of maven jnlp goal, you should delete the .pack file and manually sign the jar with jarsigner.
Jar has been previously signed
  1. The javahelp jar has some stuff in its manifest which keeps jarsigner from verifying it correctly.
    It reports:
    jarsigner: java.lang.SecurityException: invalid SHA1 signature file digest for com/sun/java/help/impl/ViewAwareComponent.class

    Edit the java help jar (in the jnlp working directory) and remove the two sun signature files. They both have the same base name and one of them ends with sha1.

  2. the myswing.jar had a similar problem. In that case the jar is retrieved from our maven repo so the old signature was removed.
meta-inf and META-INF folders
  1. the gnujaxp.jar file used by CCK had two types of meta-inf folders one upper case and one lower case. This screws up the pack200 code somehow. Here is the error it was causing:
    Caused by: org.apache.maven.plugin.MojoExecutionException: Failure to run the plugin:
            at org.codehaus.mojo.webstart.JnlpMojo.execute(JnlpMojo.java:686)
            at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
            ... 16 more
    Caused by: java.lang.RuntimeException: Error Unpacking: /home/scott/EclipseWorkspaces/Current/MavenJnlp/all-otrunk-snapshot/target/jnlp/org/concord/external/cck/gnujaxp/gnujaxp__V1.0.jar.pack
            at org.codehaus.mojo.webstart.Pack200.unpackJars(Pack200.java:98)
            at org.codehaus.mojo.webstart.JnlpMojo.execute(JnlpMojo.java:552)
            ... 18 more
    Caused by: Error in unpack200
            at com.sun.tools.apache.ant.pack200.Unpack200Task.extract(Unpack200Task.java:82)
            at org.apache.tools.ant.taskdefs.Unpack.execute(Unpack.java:119)
            at org.codehaus.mojo.webstart.Pack200.unpackJars(Pack200.java:96)
            ... 19 more
    Caused by: java.util.zip.ZipException: duplicate entry: META-INF/
            at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:163)
            at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:90)
            at com.sun.java.util.jar.pack.NativeUnpack.writeEntry(NativeUnpack.java:293)
            at com.sun.java.util.jar.pack.NativeUnpack.run(NativeUnpack.java:196)
            at com.sun.java.util.jar.pack.NativeUnpack.run(NativeUnpack.java:217)
            at com.sun.java.util.jar.pack.UnpackerImpl.unpack(UnpackerImpl.java:104)
            at com.sun.tools.apache.ant.pack200.Unpack200Task.extract(Unpack200Task.java:77)
            ... 21 more
    
Document generated by Confluence on Jan 27, 2014 16:52